FROM bootstrap-nix AS builder
WORKDIR /tmp/build
RUN \
    --mount=type=cache,target=/nix,from=/nixos/nix:latest,source=/nix \
    --mount=type=cache,target=/root/.cache \
    --mount=type=bind,target=/tmp/build






FROM scratch
WORKDIR /app
COPY --from=builder /nix-store-closure /nix/store
COPY --from=builder /tmp/outpu /app/
ENTRYPOINT [ "/app/result/bin/entryyponit" ]